import {
	REPAYMENT_MONEY,
	SET_REPAYMENT_PARAMS
} from "../../Action/repayment/repaymentMoney";
import objectAssign from "object-assign";
const initData = {
	totalLoanFee: "",
	fromType: "",
	orgi_trans_no: "",
	sucessPhoneNo: "",
	repaymentParams: {} //记录跳转还款页时的参数
};

const repaymentMoney = (state = initData, action = {}) => {
	switch (action.type) {
		case REPAYMENT_MONEY:
			return objectAssign({}, state, action.options);
		case SET_REPAYMENT_PARAMS:
			console.log("hhsdfjbsdjgsjhbgjsdbjhg:", action.options);
			return {
				...state,

				repaymentParams: action.options
			};
		default:
			return state;
	}
};
export default repaymentMoney;
